using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WallManager : MonoBehaviour
{
    public GameObject wallprefab;
    public int Count=10;//墙数量
    public float spacing=2.0f;//墙间距
    // Start is called before the first frame update
    void Start()
    {
        CreateWall();
    }

    void CreateWall(){
        for(int i=0;i<Count;i++){
            Vector3 position=new Vector3(i*spacing,0,0);
            Instantiate(wallprefab,position,Quaternion.identity,transform);
        }
    }
}
